Faulty Towers of Hanoi is a computer implementation of the classic Towers of Hanoi puzzle. The user can tackle the puzzle or sit back and watch the Mac solve it.
The object of the puzzle is to move the tower of disks from the first platform (X) to the last (Z). What makes it difficult is that you are only allowed to move one disk at a time and a bigger disk can not be placed on a smaller disk. A clock keeps track of the time taken and a counter records the number of moves.
This program was written in Turbo Pascal and uses MEWS, a Menu, Event and Window System written by the Micro-Help Group at the University of Minnesota. This instruction box is based on (About...) by Jon Wind. The Enterprise theme is from volume three of Macintosh Revealed by Stephen Chernicoff.
Version 1.2 of Faulty Towers was released into the public domain in 1987. Version 2.0 was written after receiving a request from Prof. Doug Degelman of Southern California State College. It is not public domain. Version 2.0 is being used to teach recursion and problem solving in programming classes.
I am hoping that Faulty Towers of Hanoi can also be used to raise money for the math department at Forest Lake Senior High. Please help out. I am trying to raise funds to buy Macintosh computers, software, books, etc.
I reserve all rights to this program but all money raised from version 2.0 will go directly to the Math Department.
This version fixes many bugs (I have learned a little more about programming the Macintosh in the last couple years).
--------------------------------
• File Menu •
Only one item, the quit item.
--------------------------------
• Edit Menu •
Left in for desk accessories. Not used by Faulty Towers.
--------------------------------
• Options Menu •
Set a variety of options.
• Sound
If the sound item is checked under the Options menu Faulty Towers will make a noise when a disk is moved. This option can be toggled on and off by choosing it.
• Parabolic Moves
No, this is not a new dance move by Micheal Jackson. If this item is checked the disks will move from tower to tower following the path of a parabola rather then making right corners. It will take slightly longer for the move since it takes time to fit the parabola.
• Disks
This allows the user to set the number of disks. The size of the puzzle can be varied from 1 to 15 disks. It is suggested for puzzles bigger than 9 that you let the computer do the solving (unless you have a lot of time to kill).
• Speed
The speed item under the Options menu allows you to select how fast the disks move across the screen.
• Debugger
This will not fix actual bugs in the program but it might make you feel better. It will not do any permanent damage.
--------------------------------
• Execution Menu •
• Player
This item lets you decide to try the puzzle or let the Macintosh solve it. Push the Algorithms button to see the methods the Mac uses. The Macintosh gives you the choice of two algorithms, either a recursive or iterative algorithm. Try to figure out which is faster and why. If the Macintohs item is selected a small bar graph will appear in the left corner of the screen. This chart is used to illustrate the use of a stack and procedure calls. It records how many copies of the SolveTowers procedure are on the stack at the current time.
• Run
Starts the computer solving the puzzle. This item is only enabled if you select the computer item in the Player item dialog.
• Stop
Stops the execution. Only applies if the Macintsoh is solving the puzzle.
• Pause
Stops execution until started again by resume.
• Resume
Resumes execution after a pause.
• Start Over
This item is enabled if the user item is selected under the Player item. The puzzle is re-initialized along with the count and clock.